package org.example.niceoil.dao;

import org.example.niceoil.entity.Customer;
import org.example.niceoil.mapper.CustomerMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;

@Component
public class CustomerDao {


    private final CustomerMapper customerMapper;
    @Autowired
public CustomerDao(CustomerMapper customerMapper){
    this.customerMapper=customerMapper;
}
    public   List<Customer> Select() {
        // 传递null代表查询全部
        List<Customer> userList = customerMapper.selectList(null);
      return userList;
    }
}